﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Joyintech.BLL.inpiao365;
using System.Data;
using System.Text;

namespace Joyintech.Web.inpiao365.PhenixTicket
{
    /// <summary>
    /// lockseats 的摘要说明
    /// </summary>
    public class lockseats : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {

            context.Response.ContentType = "text/plain";
            String lsh = context.Request["lsh"];
            String yth = context.Request["yth"];
            String yyh = context.Request["yyh"];
            String cc = context.Request["cc"];
            try
            {
                order_BLL bll = new order_BLL();
                DataSet ds = bll.GetLockSeatList(lsh, yth, yyh, cc);
                StringBuilder list = new StringBuilder();
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        list.Append(ds.Tables[0].Rows[i]["MovieSeatId"].ToString());
                        list.Append(",");
                    }
                }
                context.Response.Write(list.ToString());
            }
            catch (Exception)
            {

                context.Response.Write("-1");
            }

        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}